import java.awt.Color;
import java.awt.Component;

import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

public class CustomCellRenderer extends DefaultTableCellRenderer
{

	/*
	 * (non-Javadoc)
	 * 
	 * @see javax.swing.table.DefaultTableCellRenderer#getTableCellRendererComponent(javax.swing.JTable,
	 * java.lang.Object, boolean, boolean, int, int)
	 */
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
	{

		Component rendererComp = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

//		String columnName = table.getModel().getColumnName(column);
//		if (columnName.equals("Player Name"))
			rendererComp.setBackground(Color.yellow);

		return rendererComp;
	}

}
